package com.aaa.three.controller;

import com.aaa.three.pojo.query.NewsTakedown;
import com.aaa.three.result.AjaxResult;
import com.aaa.three.service.NewsTakedownService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("newst")
public class NewsTakedownController {

    @Autowired
    private NewsTakedownService newsTakedownService;

//    @RequestMapping("listTakedown")
//    private AjaxResult listTakedown(NewsTakedown newsTakedown) {
//        return newsTakedownService.listTakedown(newsTakedown);
//    }

    @RequestMapping("newsOn/{id}")
    public AjaxResult newsOn (@PathVariable("id") Integer id) {
        return newsTakedownService.newsOn(id);
    }

    @RequestMapping("newsOut/{id}")
    public AjaxResult newsOut(@PathVariable("id") Integer id) {
        return newsTakedownService.newsOut(id);
    }

    @RequestMapping("newsTop/{id}")
    public AjaxResult newsTop(@PathVariable("id") Integer id) {
        return newsTakedownService.newsTop(id);
    }

}
